
import java.io.InputStream;
import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class Alumn extends MIDlet implements CommandListener{

    private boolean midletPaused = false;
    private String url;
    private StringBuffer aux;
    private String aParsear;
    private String personasId;
    private String nombreMateria;
    private Parciales[] par=new Parciales[50];
    private boolean altaAlumno = true;

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Command exitCommand;
    private Command okCommand;
    private Command okCommand2;
    private Command okCommand11;
    private Command exitCommand5;
    private Command okCommand12;
    private Command exitCommand6;
    private Command okCommand10;
    private Command exitCommand4;
    private Command okCommand1;
    private Command exitCommand7;
    private Command stopCommand;
    private Command okCommand3;
    private Command exitCommand3;
    private Command exitCommand2;
    private Command exitCommand1;
    private Form Validacion;
    private TextField textField1;
    private TextField textField2;
    private StringItem stringItem;
    private Form Inicio;
    private ImageItem imageItem;
    private List Notaparcial;
    private List quehacer;
    private Form mesafinal;
    private Form notademesafinal;
    private List Alumnos;
    private Form DetalleNotaParcial;
    private StringItem stringItem2;
    private StringItem stringItem1;
    private StringItem stringItem3;
    private Form gestionarAlumno;
    private TextField textField8;
    private TextField textField4;
    private TextField textField5;
    private TextField textField7;
    private TextField textField;
    private TextField textField3;
    private TextField textField6;
    private List listaAlumnos;
    private Image image1;
    //</editor-fold>//GEN-END:|fields|0|

    public Alumn() {
    }

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
    //</editor-fold>//GEN-END:|methods|0|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
    /**
     * Initilizes the application.
     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
     */
    private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
        // write pre-initialize user code here
//GEN-LINE:|0-initialize|1|0-postInitialize
        // write post-initialize user code here
    }//GEN-BEGIN:|0-initialize|2|
    //</editor-fold>//GEN-END:|0-initialize|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
        // write pre-action user code here
        switchDisplayable(null, getInicio());//GEN-LINE:|3-startMIDlet|1|3-postAction
        // write post-action user code here
    }//GEN-BEGIN:|3-startMIDlet|2|
    //</editor-fold>//GEN-END:|3-startMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
        // write pre-action user code here
//GEN-LINE:|4-resumeMIDlet|1|4-postAction
        // write post-action user code here
    }//GEN-BEGIN:|4-resumeMIDlet|2|
    //</editor-fold>//GEN-END:|4-resumeMIDlet|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
    /**
     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
        // write pre-switch user code here
        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
        // write post-switch user code here
    }//GEN-BEGIN:|5-switchDisplayable|2|
    //</editor-fold>//GEN-END:|5-switchDisplayable|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
        // write pre-action user code here
        if (displayable == Alumnos) {//GEN-BEGIN:|7-commandAction|1|205-preAction
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|205-preAction
                // write pre-action user code here
                AlumnosAction();//GEN-LINE:|7-commandAction|2|205-postAction
                // write post-action user code here
            } else if (command == exitCommand3) {//GEN-LINE:|7-commandAction|3|235-preAction
                // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|4|235-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|5|34-preAction
        } else if (displayable == Inicio) {
            if (command == okCommand2) {//GEN-END:|7-commandAction|5|34-preAction
                // write pre-action user code here
                switchDisplayable(null, getValidacion());//GEN-LINE:|7-commandAction|6|34-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|7|141-preAction
        } else if (displayable == Notaparcial) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|7|141-preAction
                // write pre-action user code here
                NotaparcialAction();//GEN-LINE:|7-commandAction|8|141-postAction
                // write post-action user code here
            } else if (command == exitCommand5) {//GEN-LINE:|7-commandAction|9|170-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|10|170-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|11|19-preAction
        } else if (displayable == Validacion) {
            if (command == exitCommand) {//GEN-END:|7-commandAction|11|19-preAction
                // write pre-action user code here
                exitMIDlet();//GEN-LINE:|7-commandAction|12|19-postAction
                // write post-action user code here
            } else if (command == okCommand1) {//GEN-LINE:|7-commandAction|13|189-preAction
                try
                {
                    // SELECT * FROM finales WHERE idfinal=(SELECT MAX(idfinal) from finales)

                    //Se modifican los parametros de acceso al servlet
                    url="http://127.0.0.1:8084/ConexionBD/servlet/login?legajo="+textField2.getString()+"&clave="+textField1.getString();

                    //Seteo de tipo de parametros y conexión al servlet
                    HttpConnection c = (HttpConnection)Connector.open(url);
                    c.setRequestMethod(HttpConnection.GET);

                    //Recepción de datos
                    //ch recibe el ASCII de cada caracter por caracter que envia el servidor de aplicaciones
                    //b por otro lado va incluyendo cada uno de esos caracteres en una cadena
                    InputStream is = c.openDataInputStream();
                    int ch;
                    aux = new StringBuffer();

                    //read quita de una cola de caracter por caracter ASCII y es -1 al finalizar
                    while ((ch = is.read()) != -1)
                    {
                        aux.append((char) ch);
                    }

                    personasId=aux.toString().trim();

                    //Verificación de logeo
                    if(personasId.equals("-1")){
                        stringItem.setLabel("Datos incorrectos!");
                    }else{
                        stringItem.setLabel("");
                        System.out.println(personasId);
                        getDisplay().setCurrent(getAlumnos());
                        //getDisplay().setCurrent(getQuehacer());
                    }

                }
                catch (Exception e)
                {
                    stringItem.setLabel("Error en acceso a base de datos!");
                    e.printStackTrace();
                }
//GEN-LINE:|7-commandAction|14|189-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|15|233-preAction
        } else if (displayable == gestionarAlumno) {
            if (command == exitCommand2) {//GEN-END:|7-commandAction|15|233-preAction
                // write pre-action user code here
                switchDisplayable(null, getAlumnos());//GEN-LINE:|7-commandAction|16|233-postAction
                // write post-action user code here
            } else if (command == okCommand3) {//GEN-LINE:|7-commandAction|17|240-preAction
                try
                {
                    String auxId=personasId;
                    if (altaAlumno)
                        auxId="-1";
                    //Envio
                    url="http://127.0.0.1:8084/ConexionBD/servlet/altamodalumno?entidadid="+auxId+"&nombre="+textField.getString()+"&apellido="+textField3.getString()+"&dni="+textField4.getString()+"&domicilio="+textField5.getString()+"&clave="+textField7.getString()+"&carrera="+textField8.getString();
                    HttpConnection c = (HttpConnection)Connector.open(url);
                    c.setRequestMethod(HttpConnection.GET);

                    //Recepción
                    InputStream is = c.openDataInputStream();
                    int ch;
                    aux = new StringBuffer();

                    while ((ch = is.read()) != -1)
                    {
                        aux.append((char) ch);
                    }

                    personasId=aux.toString().trim();

                    

                }
                catch (Exception e)
                {
                    stringItem.setLabel("Error en acceso a base de datos!");
                    e.printStackTrace();
                }
//GEN-LINE:|7-commandAction|18|240-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|19|244-preAction
        } else if (displayable == listaAlumnos) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|19|244-preAction
                // write pre-action user code here
                listaAlumnosAction();//GEN-LINE:|7-commandAction|20|244-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|21|174-preAction
        } else if (displayable == mesafinal) {
            if (command == exitCommand6) {//GEN-END:|7-commandAction|21|174-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|22|174-postAction
                // write post-action user code here
            } else if (command == okCommand11) {//GEN-LINE:|7-commandAction|23|172-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|24|172-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|25|178-preAction
        } else if (displayable == notademesafinal) {
            if (command == exitCommand7) {//GEN-END:|7-commandAction|25|178-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|26|178-postAction
                // write post-action user code here
            } else if (command == okCommand12) {//GEN-LINE:|7-commandAction|27|176-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|28|176-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|29|135-preAction
        } else if (displayable == quehacer) {
            if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|29|135-preAction
                // write pre-action user code here
                quehacerAction();//GEN-LINE:|7-commandAction|30|135-postAction
                // write post-action user code here
            } else if (command == exitCommand4) {//GEN-LINE:|7-commandAction|31|165-preAction
                // write pre-action user code here
//GEN-LINE:|7-commandAction|32|165-postAction
                // write post-action user code here
            }//GEN-BEGIN:|7-commandAction|33|7-postCommandAction
        }//GEN-END:|7-commandAction|33|7-postCommandAction
        // write post-action user code here
    }//GEN-BEGIN:|7-commandAction|34|
    //</editor-fold>//GEN-END:|7-commandAction|34|


    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|18-getter|0|18-preInit
    /**
     * Returns an initiliazed instance of exitCommand component.
     * @return the initialized component instance
     */
    public Command getExitCommand() {
        if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit
            // write pre-init user code here
            exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
            // write post-init user code here
        }//GEN-BEGIN:|18-getter|2|
        return exitCommand;
    }
    //</editor-fold>//GEN-END:|18-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: Validacion ">//GEN-BEGIN:|14-getter|0|14-preInit
    /**
     * Returns an initiliazed instance of Validacion component.
     * @return the initialized component instance
     */
    public Form getValidacion() {
        if (Validacion == null) {//GEN-END:|14-getter|0|14-preInit
            // write pre-init user code here
            Validacion = new Form("Uda", new Item[] { getTextField2(), getTextField1(), getStringItem() });//GEN-BEGIN:|14-getter|1|14-postInit
            Validacion.addCommand(getExitCommand());
            Validacion.addCommand(getOkCommand1());
            Validacion.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
            // write post-init user code here
        }//GEN-BEGIN:|14-getter|2|
        return Validacion;
    }
    //</editor-fold>//GEN-END:|14-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField1 ">//GEN-BEGIN:|23-getter|0|23-preInit
    /**
     * Returns an initiliazed instance of textField1 component.
     * @return the initialized component instance
     */
    public TextField getTextField1() {
        if (textField1 == null) {//GEN-END:|23-getter|0|23-preInit
            // write pre-init user code here
            textField1 = new TextField("Contrase\u00F1a", null, 32, TextField.ANY | TextField.PASSWORD);//GEN-LINE:|23-getter|1|23-postInit
            // write post-init user code here
        }//GEN-BEGIN:|23-getter|2|
        return textField1;
    }
    //</editor-fold>//GEN-END:|23-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField2 ">//GEN-BEGIN:|24-getter|0|24-preInit
    /**
     * Returns an initiliazed instance of textField2 component.
     * @return the initialized component instance
     */
    public TextField getTextField2() {
        if (textField2 == null) {//GEN-END:|24-getter|0|24-preInit
            // write pre-init user code here
            textField2 = new TextField("Legajo", null, 32, TextField.ANY);//GEN-LINE:|24-getter|1|24-postInit
            // write post-init user code here
        }//GEN-BEGIN:|24-getter|2|
        return textField2;
    }
    //</editor-fold>//GEN-END:|24-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">//GEN-BEGIN:|25-getter|0|25-preInit
    /**
     * Returns an initiliazed instance of okCommand component.
     * @return the initialized component instance
     */
    public Command getOkCommand() {
        if (okCommand == null) {//GEN-END:|25-getter|0|25-preInit
            // write pre-init user code here
            okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|25-getter|1|25-postInit
            // write post-init user code here
        }//GEN-BEGIN:|25-getter|2|
        return okCommand;
    }
    //</editor-fold>//GEN-END:|25-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand2 ">//GEN-BEGIN:|33-getter|0|33-preInit
    /**
     * Returns an initiliazed instance of okCommand2 component.
     * @return the initialized component instance
     */
    public Command getOkCommand2() {
        if (okCommand2 == null) {//GEN-END:|33-getter|0|33-preInit
            // write pre-init user code here
            okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|33-getter|1|33-postInit
            // write post-init user code here
        }//GEN-BEGIN:|33-getter|2|
        return okCommand2;
    }
    //</editor-fold>//GEN-END:|33-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: Inicio ">//GEN-BEGIN:|32-getter|0|32-preInit
    /**
     * Returns an initiliazed instance of Inicio component.
     * @return the initialized component instance
     */
    public Form getInicio() {
        if (Inicio == null) {//GEN-END:|32-getter|0|32-preInit
            // write pre-init user code here
            Inicio = new Form("Bienvenidos", new Item[] { getImageItem() });//GEN-BEGIN:|32-getter|1|32-postInit
            Inicio.addCommand(getOkCommand2());
            Inicio.setCommandListener(this);//GEN-END:|32-getter|1|32-postInit
            // write post-init user code here
        }//GEN-BEGIN:|32-getter|2|
        return Inicio;
    }
    //</editor-fold>//GEN-END:|32-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: imageItem ">//GEN-BEGIN:|39-getter|0|39-preInit
    /**
     * Returns an initiliazed instance of imageItem component.
     * @return the initialized component instance
     */
    public ImageItem getImageItem() {
        if (imageItem == null) {//GEN-END:|39-getter|0|39-preInit
            // write pre-init user code here
            imageItem = new ImageItem("", getImage1(), ImageItem.LAYOUT_DEFAULT, "<Missing Image>");//GEN-LINE:|39-getter|1|39-postInit
            // write post-init user code here
        }//GEN-BEGIN:|39-getter|2|
        return imageItem;
    }
    //</editor-fold>//GEN-END:|39-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: image1 ">//GEN-BEGIN:|40-getter|0|40-preInit
    /**
     * Returns an initiliazed instance of image1 component.
     * @return the initialized component instance
     */
    public Image getImage1() {
        if (image1 == null) {//GEN-END:|40-getter|0|40-preInit
            // write pre-init user code here
            try {//GEN-BEGIN:|40-getter|1|40-@java.io.IOException
                image1 = Image.createImage("/facu3.jpg");
            } catch (java.io.IOException e) {//GEN-END:|40-getter|1|40-@java.io.IOException
                e.printStackTrace();
            }//GEN-LINE:|40-getter|2|40-postInit
            // write post-init user code here
        }//GEN-BEGIN:|40-getter|3|
        return image1;
    }
    //</editor-fold>//GEN-END:|40-getter|3|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">//GEN-BEGIN:|116-getter|0|116-preInit
    /**
     * Returns an initiliazed instance of stringItem component.
     * @return the initialized component instance
     */
    public StringItem getStringItem() {
        if (stringItem == null) {//GEN-END:|116-getter|0|116-preInit
            // write pre-init user code here
            stringItem = new StringItem("", "");//GEN-LINE:|116-getter|1|116-postInit
            // write post-init user code here
        }//GEN-BEGIN:|116-getter|2|
        return stringItem;
    }
    //</editor-fold>//GEN-END:|116-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: quehacer ">//GEN-BEGIN:|134-getter|0|134-preInit
    /**
     * Returns an initiliazed instance of quehacer component.
     * @return the initialized component instance
     */
    public List getQuehacer() {
        if (quehacer == null) {//GEN-END:|134-getter|0|134-preInit
            // write pre-init user code here
            quehacer = new List("Que hacer", Choice.IMPLICIT);//GEN-BEGIN:|134-getter|1|134-postInit
            quehacer.append("Consultar nota parcial", null);
            quehacer.append("Inscribirse a mesa final", null);
            quehacer.append("Consultar nota de examen final", null);
            quehacer.addCommand(getExitCommand4());
            quehacer.setCommandListener(this);
            quehacer.setSelectedFlags(new boolean[] { false, false, false });//GEN-END:|134-getter|1|134-postInit
            // write post-init user code here
        }//GEN-BEGIN:|134-getter|2|
        return quehacer;
    }
    //</editor-fold>//GEN-END:|134-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: quehacerAction ">//GEN-BEGIN:|134-action|0|134-preAction
    /**
     * Performs an action assigned to the selected list element in the quehacer component.
     */
    public void quehacerAction() {//GEN-END:|134-action|0|134-preAction
        // enter pre-action user code here
        String __selectedString = getQuehacer().getString(getQuehacer().getSelectedIndex());//GEN-BEGIN:|134-action|1|137-preAction
        if (__selectedString != null) {
            if (__selectedString.equals("Consultar nota parcial")) {//GEN-END:|134-action|1|137-preAction
                // write pre-action user code here

                try
                {
                    url="http://127.0.0.1:8084/ConexionBD/servlet/listarmateriasparcial?idalumno="+personasId;

                    //envio
                    HttpConnection c = (HttpConnection)Connector.open(url);
                    c.setRequestMethod(HttpConnection.GET);

                    //lectura
                    InputStream is = c.openDataInputStream();
                    int ch;
                    aux = new StringBuffer();

                    while ((ch = is.read()) != -1)
                    {
                        aux.append((char) ch);
                    }

                    aParsear=aux.toString().trim();

                    aParsear+="#";
                    System.out.println(aParsear);
                    System.out.println(aParsear.substring(0,1));
                    System.out.println(par[0].getNombre()==null ? aParsear.substring(0,1) : par[0].getNombre()+aParsear.substring(0,1));
                    System.out.println(par[0].getNombre());
                    par[0].setNombre(aParsear.substring(0,1));
                    System.out.println(par[0].getNombre());
                    int i=0;
                    int k=1;
                    while (!aParsear.equals("#")&&i!=50){
                        while(!aParsear.substring(0, 1).equals("|")){
                            if (k==1){
                                par[i].setNombre(par[i].getNombre()+aParsear.substring(0, 1));
                            }else if(k==2){
                                par[i].setParcial1(par[i].getParcial1()+aParsear.substring(0, 1));
                            }else if (k==3){
                                par[i].setParcial2(par[i].getParcial2()+aParsear.substring(0, 1));
                                i++;
                            }
                            aParsear=aParsear.substring(1,aParsear.length());
                        }
                        k++;
                        if (k==4)
                            k=1;
                        aParsear=aParsear.substring(1,aParsear.length());
                    }
                    i=0;
                    while(!par[i].getNombre().equals("")){
                        Notaparcial.append(par[i].getNombre(), null);
                        i++;
                    }

                }
                catch (Exception e)
                {
                    stringItem.setLabel("Error en acceso a base de datos!");
                    e.printStackTrace();
                }

                switchDisplayable(null, getNotaparcial());//GEN-LINE:|134-action|2|137-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Inscribirse a mesa final")) {//GEN-LINE:|134-action|3|138-preAction
                // write pre-action user code here
                switchDisplayable(null, getMesafinal());//GEN-LINE:|134-action|4|138-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Consultar nota de examen final")) {//GEN-LINE:|134-action|5|139-preAction
                // write pre-action user code here
                switchDisplayable(null, getNotademesafinal());//GEN-LINE:|134-action|6|139-postAction
                // write post-action user code here
            }//GEN-BEGIN:|134-action|7|134-postAction
        }//GEN-END:|134-action|7|134-postAction
        // enter post-action user code here
    }//GEN-BEGIN:|134-action|8|
    //</editor-fold>//GEN-END:|134-action|8|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: Notaparcial ">//GEN-BEGIN:|140-getter|0|140-preInit
    /**
     * Returns an initiliazed instance of Notaparcial component.
     * @return the initialized component instance
     */
    public List getNotaparcial() {
        if (Notaparcial == null) {//GEN-END:|140-getter|0|140-preInit
            // write pre-init user code here
            Notaparcial = new List("list1", Choice.IMPLICIT);//GEN-BEGIN:|140-getter|1|140-postInit
            Notaparcial.addCommand(getExitCommand5());
            Notaparcial.setCommandListener(this);
            Notaparcial.setSelectedFlags(new boolean[] {  });//GEN-END:|140-getter|1|140-postInit
            // write post-init user code here
        }//GEN-BEGIN:|140-getter|2|
        return Notaparcial;
    }
    //</editor-fold>//GEN-END:|140-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: NotaparcialAction ">//GEN-BEGIN:|140-action|0|140-preAction
    /**
     * Performs an action assigned to the selected list element in the Notaparcial component.
     */
    public void NotaparcialAction() {//GEN-END:|140-action|0|140-preAction
        // enter pre-action user code here
        String __selectedString = getNotaparcial().getString(getNotaparcial().getSelectedIndex());//GEN-LINE:|140-action|1|140-postAction
        // enter post-action user code here
        // para poner enlaces
        if (__selectedString != null) {
            //como hacer que cree código aca
            nombreMateria=__selectedString;
            getDisplay().setCurrent(getDetalleNotaParcial());
        }
    }//GEN-BEGIN:|140-action|2|
    //</editor-fold>//GEN-END:|140-action|2|







    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: mesafinal ">//GEN-BEGIN:|149-getter|0|149-preInit
    /**
     * Returns an initiliazed instance of mesafinal component.
     * @return the initialized component instance
     */
    public Form getMesafinal() {
        if (mesafinal == null) {//GEN-END:|149-getter|0|149-preInit
            // write pre-init user code here
            mesafinal = new Form("form");//GEN-BEGIN:|149-getter|1|149-postInit
            mesafinal.addCommand(getOkCommand11());
            mesafinal.addCommand(getExitCommand6());
            mesafinal.setCommandListener(this);//GEN-END:|149-getter|1|149-postInit
            // write post-init user code here
        }//GEN-BEGIN:|149-getter|2|
        return mesafinal;
    }
    //</editor-fold>//GEN-END:|149-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: notademesafinal ">//GEN-BEGIN:|150-getter|0|150-preInit
    /**
     * Returns an initiliazed instance of notademesafinal component.
     * @return the initialized component instance
     */
    public Form getNotademesafinal() {
        if (notademesafinal == null) {//GEN-END:|150-getter|0|150-preInit
            // write pre-init user code here
            notademesafinal = new Form("form1");//GEN-BEGIN:|150-getter|1|150-postInit
            notademesafinal.addCommand(getOkCommand12());
            notademesafinal.addCommand(getExitCommand7());
            notademesafinal.setCommandListener(this);//GEN-END:|150-getter|1|150-postInit
            // write post-init user code here
        }//GEN-BEGIN:|150-getter|2|
        return notademesafinal;
    }
    //</editor-fold>//GEN-END:|150-getter|2|



    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand4 ">//GEN-BEGIN:|164-getter|0|164-preInit
    /**
     * Returns an initiliazed instance of exitCommand4 component.
     * @return the initialized component instance
     */
    public Command getExitCommand4() {
        if (exitCommand4 == null) {//GEN-END:|164-getter|0|164-preInit
            // write pre-init user code here
            exitCommand4 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|164-getter|1|164-postInit
            // write post-init user code here
        }//GEN-BEGIN:|164-getter|2|
        return exitCommand4;
    }
    //</editor-fold>//GEN-END:|164-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand10 ">//GEN-BEGIN:|167-getter|0|167-preInit
    /**
     * Returns an initiliazed instance of okCommand10 component.
     * @return the initialized component instance
     */
    public Command getOkCommand10() {
        if (okCommand10 == null) {//GEN-END:|167-getter|0|167-preInit
            // write pre-init user code here
            okCommand10 = new Command("Ok", Command.OK, 0);//GEN-LINE:|167-getter|1|167-postInit
            // write post-init user code here
        }//GEN-BEGIN:|167-getter|2|
        return okCommand10;
    }
    //</editor-fold>//GEN-END:|167-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand5 ">//GEN-BEGIN:|169-getter|0|169-preInit
    /**
     * Returns an initiliazed instance of exitCommand5 component.
     * @return the initialized component instance
     */
    public Command getExitCommand5() {
        if (exitCommand5 == null) {//GEN-END:|169-getter|0|169-preInit
            // write pre-init user code here
            exitCommand5 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|169-getter|1|169-postInit
            // write post-init user code here
        }//GEN-BEGIN:|169-getter|2|
        return exitCommand5;
    }
    //</editor-fold>//GEN-END:|169-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand11 ">//GEN-BEGIN:|171-getter|0|171-preInit
    /**
     * Returns an initiliazed instance of okCommand11 component.
     * @return the initialized component instance
     */
    public Command getOkCommand11() {
        if (okCommand11 == null) {//GEN-END:|171-getter|0|171-preInit
            // write pre-init user code here
            okCommand11 = new Command("Ok", Command.OK, 0);//GEN-LINE:|171-getter|1|171-postInit
            // write post-init user code here
        }//GEN-BEGIN:|171-getter|2|
        return okCommand11;
    }
    //</editor-fold>//GEN-END:|171-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand6 ">//GEN-BEGIN:|173-getter|0|173-preInit
    /**
     * Returns an initiliazed instance of exitCommand6 component.
     * @return the initialized component instance
     */
    public Command getExitCommand6() {
        if (exitCommand6 == null) {//GEN-END:|173-getter|0|173-preInit
            // write pre-init user code here
            exitCommand6 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|173-getter|1|173-postInit
            // write post-init user code here
        }//GEN-BEGIN:|173-getter|2|
        return exitCommand6;
    }
    //</editor-fold>//GEN-END:|173-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand12 ">//GEN-BEGIN:|175-getter|0|175-preInit
    /**
     * Returns an initiliazed instance of okCommand12 component.
     * @return the initialized component instance
     */
    public Command getOkCommand12() {
        if (okCommand12 == null) {//GEN-END:|175-getter|0|175-preInit
            // write pre-init user code here
            okCommand12 = new Command("Ok", Command.OK, 0);//GEN-LINE:|175-getter|1|175-postInit
            // write post-init user code here
        }//GEN-BEGIN:|175-getter|2|
        return okCommand12;
    }
    //</editor-fold>//GEN-END:|175-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand7 ">//GEN-BEGIN:|177-getter|0|177-preInit
    /**
     * Returns an initiliazed instance of exitCommand7 component.
     * @return the initialized component instance
     */
    public Command getExitCommand7() {
        if (exitCommand7 == null) {//GEN-END:|177-getter|0|177-preInit
            // write pre-init user code here
            exitCommand7 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|177-getter|1|177-postInit
            // write post-init user code here
        }//GEN-BEGIN:|177-getter|2|
        return exitCommand7;
    }
    //</editor-fold>//GEN-END:|177-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand1 ">//GEN-BEGIN:|188-getter|0|188-preInit
    /**
     * Returns an initiliazed instance of okCommand1 component.
     * @return the initialized component instance
     */
    public Command getOkCommand1() {
        if (okCommand1 == null) {//GEN-END:|188-getter|0|188-preInit
            // write pre-init user code here
            okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|188-getter|1|188-postInit
            // write post-init user code here
        }//GEN-BEGIN:|188-getter|2|
        return okCommand1;
    }
    //</editor-fold>//GEN-END:|188-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: DetalleNotaParcial ">//GEN-BEGIN:|192-getter|0|192-preInit
    /**
     * Returns an initiliazed instance of DetalleNotaParcial component.
     * @return the initialized component instance
     */
    public Form getDetalleNotaParcial() {
        if (DetalleNotaParcial == null) {//GEN-END:|192-getter|0|192-preInit
            // write pre-init user code here
            DetalleNotaParcial = new Form("form", new Item[] { getStringItem1(), getStringItem2(), getStringItem3() });//GEN-LINE:|192-getter|1|192-postInit
            // write post-init user code here
        }//GEN-BEGIN:|192-getter|2|
        return DetalleNotaParcial;
    }
    //</editor-fold>//GEN-END:|192-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem1 ">//GEN-BEGIN:|196-getter|0|196-preInit
    /**
     * Returns an initiliazed instance of stringItem1 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem1() {
        if (stringItem1 == null) {//GEN-END:|196-getter|0|196-preInit
            // write pre-init user code here
            stringItem1 = new StringItem("", "");//GEN-LINE:|196-getter|1|196-postInit
            // write post-init user code here
        }//GEN-BEGIN:|196-getter|2|
        return stringItem1;
    }
    //</editor-fold>//GEN-END:|196-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem2 ">//GEN-BEGIN:|197-getter|0|197-preInit
    /**
     * Returns an initiliazed instance of stringItem2 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem2() {
        if (stringItem2 == null) {//GEN-END:|197-getter|0|197-preInit
            // write pre-init user code here
            stringItem2 = new StringItem("", "");//GEN-LINE:|197-getter|1|197-postInit
            // write post-init user code here
        }//GEN-BEGIN:|197-getter|2|
        return stringItem2;
    }
    //</editor-fold>//GEN-END:|197-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem3 ">//GEN-BEGIN:|198-getter|0|198-preInit
    /**
     * Returns an initiliazed instance of stringItem3 component.
     * @return the initialized component instance
     */
    public StringItem getStringItem3() {
        if (stringItem3 == null) {//GEN-END:|198-getter|0|198-preInit
            // write pre-init user code here
            stringItem3 = new StringItem("", "");//GEN-LINE:|198-getter|1|198-postInit
            // write post-init user code here
        }//GEN-BEGIN:|198-getter|2|
        return stringItem3;
    }
    //</editor-fold>//GEN-END:|198-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stopCommand ">//GEN-BEGIN:|202-getter|0|202-preInit
    /**
     * Returns an initiliazed instance of stopCommand component.
     * @return the initialized component instance
     */
    public Command getStopCommand() {
        if (stopCommand == null) {//GEN-END:|202-getter|0|202-preInit
            // write pre-init user code here
            stopCommand = new Command("Stop", Command.STOP, 0);//GEN-LINE:|202-getter|1|202-postInit
            // write post-init user code here
        }//GEN-BEGIN:|202-getter|2|
        return stopCommand;
    }
    //</editor-fold>//GEN-END:|202-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: Alumnos ">//GEN-BEGIN:|204-getter|0|204-preInit
    /**
     * Returns an initiliazed instance of Alumnos component.
     * @return the initialized component instance
     */
    public List getAlumnos() {
        if (Alumnos == null) {//GEN-END:|204-getter|0|204-preInit
            // write pre-init user code here
            Alumnos = new List("list", Choice.IMPLICIT);//GEN-BEGIN:|204-getter|1|204-postInit
            Alumnos.append("Alta Alumno", null);
            Alumnos.append("Baja Alumno", null);
            Alumnos.append("Modificaci\u00F3n Alumno", null);
            Alumnos.append("Lista Alumnos", null);
            Alumnos.addCommand(getExitCommand3());
            Alumnos.setCommandListener(this);
            Alumnos.setSelectedFlags(new boolean[] { false, false, false, false });//GEN-END:|204-getter|1|204-postInit
            // write post-init user code here
        }//GEN-BEGIN:|204-getter|2|
        return Alumnos;
    }
    //</editor-fold>//GEN-END:|204-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: AlumnosAction ">//GEN-BEGIN:|204-action|0|204-preAction
    /**
     * Performs an action assigned to the selected list element in the Alumnos component.
     */
    public void AlumnosAction() {//GEN-END:|204-action|0|204-preAction
        // enter pre-action user code here
        String __selectedString = getAlumnos().getString(getAlumnos().getSelectedIndex());//GEN-BEGIN:|204-action|1|207-preAction
        if (__selectedString != null) {
            if (__selectedString.equals("Alta Alumno")) {//GEN-END:|204-action|1|207-preAction
                altaAlumno=true;
                switchDisplayable(null, getGestionarAlumno());//GEN-LINE:|204-action|2|207-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Baja Alumno")) {//GEN-LINE:|204-action|3|209-preAction
                // write pre-action user code here
//GEN-LINE:|204-action|4|209-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Modificaci\u00F3n Alumno")) {//GEN-LINE:|204-action|5|208-preAction

                altaAlumno=false;
                url="http://127.0.0.1:8084/ConexionBD/servlet/consultaalumno?personasid="+personasId;

                try{

                    //envio
                    HttpConnection c = (HttpConnection)Connector.open(url);
                    c.setRequestMethod(HttpConnection.GET);

                    //lectura
                    InputStream is = c.openDataInputStream();
                    int ch;
                    aux = new StringBuffer();

                    while ((ch = is.read()) != -1)
                    {
                        aux.append((char) ch);
                    }

                    aParsear=aux.toString().trim();
                    System.out.println(aParsear);

                    getDisplay().setCurrent(getGestionarAlumno());
                    gestionarAlumno.setTitle("Modificar Alumno");
                    int i=0;
                    while (i<7){
                        int pos=aParsear.indexOf("|");
                        switch (i){
                            case 0:
                                textField6.setString(aParsear.substring(0, pos));
                                break;
                            case 1:
                                textField.setString(aParsear.substring(0, pos));
                                break;
                            case 2:
                                textField3.setString(aParsear.substring(0, pos));
                                break;
                            case 3:
                                textField4.setString(aParsear.substring(0, pos));
                                break;
                            case 4:
                                textField5.setString(aParsear.substring(0, pos));
                                break;
                            case 5:
                                textField7.setString(aParsear.substring(0, pos));
                                break;
                            case 6:
                                textField8.setString(aParsear.substring(0, pos));
                                break;
                        }
                        i++;
                        aParsear=aParsear.substring(pos+1);
                    }
                } catch (Exception e) {
                    stringItem.setLabel("Error en acceso a base de datos!");
                    e.printStackTrace();
                }
//GEN-LINE:|204-action|6|208-postAction
                // write post-action user code here
            } else if (__selectedString.equals("Lista Alumnos")) {//GEN-LINE:|204-action|7|212-preAction

                url="http://127.0.0.1:8084/ConexionBD/servlet/consultaalumno?entidadid="+personasId;

                // AAAAAAAAAAKKKKKKKKKKKKKKKKKKKKKK
//GEN-LINE:|204-action|8|212-postAction
                // write post-action user code here
            }//GEN-BEGIN:|204-action|9|204-postAction
        }//GEN-END:|204-action|9|204-postAction
        // enter post-action user code here
    }//GEN-BEGIN:|204-action|10|
    //</editor-fold>//GEN-END:|204-action|10|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: gestionarAlumno ">//GEN-BEGIN:|210-getter|0|210-preInit
    /**
     * Returns an initiliazed instance of gestionarAlumno component.
     * @return the initialized component instance
     */
    public Form getGestionarAlumno() {
        if (gestionarAlumno == null) {//GEN-END:|210-getter|0|210-preInit
            // write pre-init user code here
            gestionarAlumno = new Form("", new Item[] { getTextField6(), getTextField(), getTextField3(), getTextField4(), getTextField5(), getTextField7(), getTextField8() });//GEN-BEGIN:|210-getter|1|210-postInit
            gestionarAlumno.addCommand(getExitCommand2());
            gestionarAlumno.addCommand(getOkCommand3());
            gestionarAlumno.setCommandListener(this);//GEN-END:|210-getter|1|210-postInit
            // write post-init user code here
        }//GEN-BEGIN:|210-getter|2|
        return gestionarAlumno;
    }
    //</editor-fold>//GEN-END:|210-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">//GEN-BEGIN:|214-getter|0|214-preInit
    /**
     * Returns an initiliazed instance of textField component.
     * @return the initialized component instance
     */
    public TextField getTextField() {
        if (textField == null) {//GEN-END:|214-getter|0|214-preInit
        // write pre-init user code here
            textField = new TextField("Nombre:", null, 32, TextField.ANY);//GEN-LINE:|214-getter|1|214-postInit
        // write post-init user code here
        }//GEN-BEGIN:|214-getter|2|
        return textField;
    }
    //</editor-fold>//GEN-END:|214-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField3 ">//GEN-BEGIN:|215-getter|0|215-preInit
    /**
     * Returns an initiliazed instance of textField3 component.
     * @return the initialized component instance
     */
    public TextField getTextField3() {
        if (textField3 == null) {//GEN-END:|215-getter|0|215-preInit
        // write pre-init user code here
            textField3 = new TextField("Apellido:", null, 32, TextField.ANY);//GEN-LINE:|215-getter|1|215-postInit
        // write post-init user code here
        }//GEN-BEGIN:|215-getter|2|
        return textField3;
    }
    //</editor-fold>//GEN-END:|215-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField4 ">//GEN-BEGIN:|216-getter|0|216-preInit
    /**
     * Returns an initiliazed instance of textField4 component.
     * @return the initialized component instance
     */
    public TextField getTextField4() {
        if (textField4 == null) {//GEN-END:|216-getter|0|216-preInit
        // write pre-init user code here
            textField4 = new TextField("DNI:", null, 32, TextField.ANY);//GEN-LINE:|216-getter|1|216-postInit
        // write post-init user code here
        }//GEN-BEGIN:|216-getter|2|
        return textField4;
    }
    //</editor-fold>//GEN-END:|216-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField5 ">//GEN-BEGIN:|217-getter|0|217-preInit
    /**
     * Returns an initiliazed instance of textField5 component.
     * @return the initialized component instance
     */
    public TextField getTextField5() {
        if (textField5 == null) {//GEN-END:|217-getter|0|217-preInit
        // write pre-init user code here
            textField5 = new TextField("Domicilio:", null, 32, TextField.ANY);//GEN-LINE:|217-getter|1|217-postInit
        // write post-init user code here
        }//GEN-BEGIN:|217-getter|2|
        return textField5;
    }
    //</editor-fold>//GEN-END:|217-getter|2|



    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField7 ">//GEN-BEGIN:|219-getter|0|219-preInit
    /**
     * Returns an initiliazed instance of textField7 component.
     * @return the initialized component instance
     */
    public TextField getTextField7() {
        if (textField7 == null) {//GEN-END:|219-getter|0|219-preInit
        // write pre-init user code here
            textField7 = new TextField("Clave:", null, 32, TextField.ANY);//GEN-LINE:|219-getter|1|219-postInit
        // write post-init user code here
        }//GEN-BEGIN:|219-getter|2|
        return textField7;
    }
    //</editor-fold>//GEN-END:|219-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField8 ">//GEN-BEGIN:|220-getter|0|220-preInit
    /**
     * Returns an initiliazed instance of textField8 component.
     * @return the initialized component instance
     */
    public TextField getTextField8() {
        if (textField8 == null) {//GEN-END:|220-getter|0|220-preInit
        // write pre-init user code here
            textField8 = new TextField("Carrera:", null, 32, TextField.ANY);//GEN-LINE:|220-getter|1|220-postInit
        // write post-init user code here
        }//GEN-BEGIN:|220-getter|2|
        return textField8;
    }
    //</editor-fold>//GEN-END:|220-getter|2|

















    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand1 ">//GEN-BEGIN:|230-getter|0|230-preInit
    /**
     * Returns an initiliazed instance of exitCommand1 component.
     * @return the initialized component instance
     */
    public Command getExitCommand1() {
        if (exitCommand1 == null) {//GEN-END:|230-getter|0|230-preInit
            // write pre-init user code here
            exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|230-getter|1|230-postInit
            // write post-init user code here
        }//GEN-BEGIN:|230-getter|2|
        return exitCommand1;
    }
    //</editor-fold>//GEN-END:|230-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand2 ">//GEN-BEGIN:|232-getter|0|232-preInit
    /**
     * Returns an initiliazed instance of exitCommand2 component.
     * @return the initialized component instance
     */
    public Command getExitCommand2() {
        if (exitCommand2 == null) {//GEN-END:|232-getter|0|232-preInit
            // write pre-init user code here
            exitCommand2 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|232-getter|1|232-postInit
            // write post-init user code here
        }//GEN-BEGIN:|232-getter|2|
        return exitCommand2;
    }
    //</editor-fold>//GEN-END:|232-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand3 ">//GEN-BEGIN:|234-getter|0|234-preInit
    /**
     * Returns an initiliazed instance of exitCommand3 component.
     * @return the initialized component instance
     */
    public Command getExitCommand3() {
        if (exitCommand3 == null) {//GEN-END:|234-getter|0|234-preInit
            // write pre-init user code here
            exitCommand3 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|234-getter|1|234-postInit
            // write post-init user code here
        }//GEN-BEGIN:|234-getter|2|
        return exitCommand3;
    }
    //</editor-fold>//GEN-END:|234-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand3 ">//GEN-BEGIN:|239-getter|0|239-preInit
    /**
     * Returns an initiliazed instance of okCommand3 component.
     * @return the initialized component instance
     */
    public Command getOkCommand3() {
        if (okCommand3 == null) {//GEN-END:|239-getter|0|239-preInit
            // write pre-init user code here
            okCommand3 = new Command("Ok", Command.OK, 0);//GEN-LINE:|239-getter|1|239-postInit
            // write post-init user code here
        }//GEN-BEGIN:|239-getter|2|
        return okCommand3;
    }
    //</editor-fold>//GEN-END:|239-getter|2|



    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField6 ">//GEN-BEGIN:|242-getter|0|242-preInit
    /**
     * Returns an initiliazed instance of textField6 component.
     * @return the initialized component instance
     */
    public TextField getTextField6() {
        if (textField6 == null) {//GEN-END:|242-getter|0|242-preInit
            // write pre-init user code here
            textField6 = new TextField("Legajo:", null, 32, TextField.ANY);//GEN-LINE:|242-getter|1|242-postInit
            // write post-init user code here
        }//GEN-BEGIN:|242-getter|2|
        return textField6;
    }
    //</editor-fold>//GEN-END:|242-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: listaAlumnos ">//GEN-BEGIN:|243-getter|0|243-preInit
    /**
     * Returns an initiliazed instance of listaAlumnos component.
     * @return the initialized component instance
     */
    public List getListaAlumnos() {
        if (listaAlumnos == null) {//GEN-END:|243-getter|0|243-preInit
            // write pre-init user code here
            listaAlumnos = new List("list", Choice.IMPLICIT);//GEN-BEGIN:|243-getter|1|243-postInit
            listaAlumnos.setCommandListener(this);//GEN-END:|243-getter|1|243-postInit
            // write post-init user code here
        }//GEN-BEGIN:|243-getter|2|
        return listaAlumnos;
    }
    //</editor-fold>//GEN-END:|243-getter|2|

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: listaAlumnosAction ">//GEN-BEGIN:|243-action|0|243-preAction
    /**
     * Performs an action assigned to the selected list element in the listaAlumnos component.
     */
    public void listaAlumnosAction() {//GEN-END:|243-action|0|243-preAction
        // enter pre-action user code here
        String __selectedString = getListaAlumnos().getString(getListaAlumnos().getSelectedIndex());//GEN-LINE:|243-action|1|243-postAction
        // enter post-action user code here
    }//GEN-BEGIN:|243-action|2|
    //</editor-fold>//GEN-END:|243-action|2|

    public Display getDisplay () {
        return Display.getDisplay(this);
    }

    public void exitMIDlet() {
        switchDisplayable (null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    public void startApp() {
        if (midletPaused) {
            resumeMIDlet ();
        } else {
            initialize ();
            startMIDlet ();
        }
        midletPaused = false;
    }

    public void pauseApp() {
        midletPaused = true;
    }

    public void destroyApp(boolean unconditional) {
    }
}
